//
//  LRJDesFirCollectionReusableView.m
//  BreadTravel
//
//  Created by 李润嘉 on 15/12/25.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "LRJDesFirCollectionReusableView.h"

@implementation LRJDesFirCollectionReusableView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUp];
    }
    return self;
}
- (void)setUp
{
    self.titleImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 30, 30)];
    self.titleImageView.image = [UIImage imageNamed:@"iconfont-38.png"];
    [self addSubview:self.titleImageView];
    
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(40, 10, 200, 30)];
//    self.label.backgroundColor = [UIColor colorWithRed:1.000 green:0.844 blue:0.817 alpha:1.000];
    self.label.textColor = [UIColor colorWithRed:0.573 green:0.529 blue:0.451 alpha:1.000];
    [self addSubview:self.label];
    
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    self.button.frame = CGRectMake(WIDTH - 50, 10, 50, 30);
//    self.button.backgroundColor = [UIColor colorWithRed:1.000 green:0.844 blue:0.817 alpha:1.000];
    [self addSubview:self.button];
    [self.button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    
    
    
}
- (void)buttonAction:(UIButton *)but{
    
    //协议第三步:执行协议方法
    [self.LRJReusableDelegate delegateFunction:self.index];
}










@end
